* {
    margin: 0;
    padding: 0;
}

body {
    // 明亮主题
    --light-bgc: #fff; // 背景色
    --light-textwrapbgc: #fff; // 文本框包裹容器背景色
    --light-shadowcolor: #ccc; // 阴影颜色

    // 暗黑主题
    --dark-bgc: #272b38;
    --dark-textwrapbgc: #f1f3f4;
    --dark-shadowcolor: #333; // 阴影颜色

    --bgc: #fff;
    --textwrapbgc: #fff;
    --shadowcolor: #ccc;
    --musiccolor: #272b38; // 歌曲名颜色
    --linearbarcolor: #ffffff9a; // 渐变条颜色
    // --linearcolor: #272b389a; // 渐变条颜色

    --taiyang: url('../icon/taiyang.png');
    --yueliang: url('../icon/yueliang.png');
    --switchIcon: var(--yueliang);

    --transition-time: 0.3s; // 主题切换时间间隔
    --linear-bar-show: visible;

    background: var(--bgc);
    overflow: hidden;
    transition: var(--transition-time);
}

// 最外层包裹容器
.search-wrap {
    position: absolute;
    left: 50%;
    margin-left: -350px;
    width: 700px;
    height: 100vh;
    // text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    .search-box {
        width: 90%;
        height: 58px;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 250px;
        padding: 5px 0;
        border-radius: 58px;
        box-shadow: 0 -1px 2px var(--shadowcolor), 0 4px 4px var(--shadowcolor);
        transition: .5s ease-in-out;
        background: var(--textwrapbgc);

        .btn {
            cursor: pointer;
            outline: none;
            border: none;
            background: transparent;
            padding: 10px;

            i {
                color: #ee264e;
                font-size: 2rem;
                font-weight: lighter;
                transition: .3s;
            }
        }

        // Element UI 开关
        .switch {
            position: absolute;
            right: 28px;
            bottom: -37px;
        }

        // 主题开关样式 Mint UI

        .mint-switch {
            position: absolute;
            right: 28px;
            bottom: 80px;
            z-index: 999;
        }

        // 开启样式
        .mint-switch-input:checked+.mint-switch-core {
            background: #fff;
            border-color: #fff;
        }

        // 关闭样式
        .mint-switch-core {
            display: inline-block;
            position: relative;
            width: 50px;
            height: 30px;
            border: 1px solid #d9d9d9;
            // border: none;
            border-radius: 15px;
            box-sizing: border-box;

            &::before {
                width: 50px;
                height: 28px;
                background-color: #272b38;
            }

            // 小圆球
            &::after {
                width: 28px;
                height: 28px;
                background-color: #fff;
                // background: url('../icon/taiyang.png');
                background: var(--switchIcon);
                background-size: 100%;
                background-position: center;
                background-repeat: no-repeat;
                box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
                transition: .2s;
            }
        }
    }

    // 搜索后，搜索框上移，腾出空间下方展示歌曲
    .searched {
        margin-top: 180px;
    }

    // 设置文本框宽度
    .el-autocomplete {
        width: 80%;

        .el-input {
            width: 100%;
        }
    }

    #search-text {
        border: none;
        outline: none;
        width: 100%;
        height: 100%;
        font-size: 1.5rem;
        padding: 5px 10px;
        background: transparent;
        transition: .3s;

        // 设置placeholder文字颜色
        &::-webkit-input-placeholder {
            color: #ccc;
        }
    }

    // 歌曲列表样式
    .music-list {
        width: 120%;
        margin-top: 15px;
        padding-top: 2px;
        position: relative;

        // 上边界渐变
        &::before {
            content: '';
            width: 100%;
            height: 20px;
            background: linear-gradient(to bottom, var(--bgc) 10%, var(--linearbarcolor) 50%, rgba(255, 255, 255, 0));
            position: absolute;
            top: 30px;
            left: 0;
            z-index: 999;
            visibility: var(--linear-bar-show);
        }

        // 下边界渐变
        &::after {
            content: '';
            width: 100%;
            height: 20px;
            background: linear-gradient(to top, var(--bgc) 10%, var(--linearbarcolor) 50%, rgba(255, 255, 255, 0));
            position: absolute;
            bottom: 0;
            left: 0;
            z-index: 999;
            visibility: var(--linear-bar-show);
        }

        h3 {
            text-align: center;
            font-size: 14px;
            font-weight: lighter;
            color: #ccc;
            position: relative;

            b {
                color: #ee264e;
            }
        }

        ul {
            list-style: none;
            position: relative;
            z-index: 1;
            display: flex;
            justify-content: center;
            flex-wrap: wrap;

            min-height: 200px;
            max-height: 53vh;
            margin-top: 10px;
            padding-left: 10px;
            padding-top: 20px;
            padding-bottom: 10px;
            overflow-y: auto;

            &::-webkit-scrollbar {
                width: 15px;
            }

            li {
                margin: 2px 5px;
                height: 20px;
                line-height: 20px;
                padding: 2px 8px;
                border-radius: 20px;
                font-weight: lighter;
                overflow: hidden;
                display: flex;
                flex-direction: column;
                justify-content: flex-start;

                // 彩色标签
                &:nth-child(n) {
                    background: rgba(252, 100, 125, 0.685);
                }

                &:nth-child(2n) {
                    background: rgba(255, 220, 62, 0.705);
                }

                &:nth-child(3n) {
                    background: rgba(99, 236, 57, 0.726);
                }

                &:nth-child(4n) {
                    background: rgba(64, 216, 243, 0.74);
                }

                &:nth-child(5n) {
                    background: rgba(201, 86, 255, 0.705);
                }

                a {
                    text-decoration: none;

                    &:link,
                    &:visited,
                    &:active {
                        color: #272b38;
                        // color: #fff;
                        color: var(--musiccolor);
                    }
                }

                .cloud-password {
                    margin-top: 10px;
                    width: 1px; // 设置网盘密码宽度为最小
                }

                // .el-button {
                //     height: 20px;
                //     line-height: 20px;
                //     padding: 0 5px;
                //     border-radius: 20px;
                //     background: yellow;
                // }

            }

        }


    }
}


.el-tooltip__popper {
    // background-color: red !important;

    #cloud-password {
        width: 2rem;
        border: none;
    }
}

// 更改提示框下方间距
.el-tooltip__popper[x-placement^=top] {
    margin-bottom: 3px !important;
}

// 移动端适配
@media screen and (max-width: 800px) {
    .search-wrap {
        width: 100%;
        left: auto;
        margin: 0;

        .search-box {
            height: 40px;
            padding: 0;
            border-radius: 40px;
            box-shadow: 0 -1px 2px var(--shadowcolor), 0 2px 2px var(--shadowcolor);

            .btn {
                outline: none;
                border: none;
                background: transparent;
                padding: 10px;

                i {
                    font-size: 1rem;
                }
            }

            .mint-switch {
                position: absolute;
                right: 18px;
                bottom: 50px;
                z-index: 999;
            }

            // 按钮右移偏移量
            .mint-switch-input:checked+.mint-switch-core::after {
                transform: translateX(10px);
                -webkit-transform: translateX(10px);
            }

            // 关闭样式
            .mint-switch-core {
                width: 30px;
                height: 20px;
                border: 1px solid #d9d9d9;
                border-radius: 15px;

                &::before {
                    width: 30px;
                    height: 18px;
                    background-color: #272b38;
                }

                // 小圆球
                &::after {
                    width: 18px;
                    height: 18px;
                    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
                }
            }
        }

        .el-autocomplete {
            width: 80%;

            .el-input {
                width: 100%;
            }
        }

        #search-text {
            font-size: 1rem;
        }

        // 歌曲列表样式
        .music-list {
            width: 100%;

            &::before {
                top: 42px;
            }

            &::before,
            &::after {
                display: none;
            }

            h3 {
                font-size: 12px;
            }

            ul {
                max-height: 50vh;

                li {
                    font-size: 12px;
                }

            }
        }
    }
}